//
//  WCBookmarksGroup.m
//  WabbitCode
//
//  Created by William Towe on 4/11/09.
//  Copyright 2009 Revolution Software. All rights reserved.
//

#import "WCBookmarksGroup.h"
#import "WCProject.h"
#import "WCBookmark.h"


@implementation WCBookmarksGroup
#pragma mark *** Subclass Overrides ***
- (NSString *)name {
	return NSLocalizedString(@"Bookmarks",@"Bookmarks");
}

- (NSImage *)icon {
	return [NSImage imageNamed:@"BookmarksGroup16x16"];
}

- (BOOL)canRenameNode {
	return NO;
}

- (BOOL)canDeleteNode {
	return NO;
}

- (BOOL)canGetInfo {
	return NO;
}

- (NSString *)nodeToolTip {
	return nil;
}

- (BOOL)isRootLevelGroup {
	return YES;
}

#pragma mark *** Public Methods ***
#pragma mark Accessors
@synthesize project=_project;

- (void)setProject:(WCProject *)value {
	if (_project == value)
		return;
	
	_project = value;
}

#pragma mark Creation
+ (id)bookmarksGroup; {
	return [super treeNodeWithNodeName:nil];
}

- (void)addBookmarkAtLineNumber:(NSUInteger)lineNumber inTextFile:(WCTextFile *)textFile; {
	[[self mutableChildNodes] addObject:[WCBookmark bookmarkWithTextFile:textFile lineNumber:lineNumber]];
}
@end
